home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / textual / tex / files / !preview / h / web2c < prev   
Encoding:
Text File  |  1990-03-03  |  1.1 KB  |  53 lines

  1. /*
  2.  * Main include file for tangle etc. in C
  3.  *
  4.  * Tim Morgan  2/11/88
  5.  */
  6.  
  7. #include <stdio.h>
  8. #include "site.h"
  9.  
  10. /*
  11.  * Global routines implemented as macros, plus some type coercion stuff.
  12.  */
  13.  
  14. #define    odd(x)        ((x) % 2)
  15. #define    putbyte(x,f)    putc(((x)&255), f)
  16. #define    round(x)    zround((double)(x))
  17. #define incr(x)        ++x
  18. #define    decr(x)        --x
  19. #define    trunc(x)    ( (integer) (x) )
  20. #define    readln(f)    while (!feof(f) && getc(f) != '\n')
  21. #define    read(f, b)    b = getc(f)
  22. #define    input3ints(a,b,c)    zinput_3ints(&a, &b, &c)
  23. #define zfseek(f,n,w)    (void) fseek(f, (long) n, (int) w)
  24. #define eof(f)        feof(f)
  25. #define    abs(x)        ((x>=0)?(x):(-(x)))
  26. #define    fabs(x)        ((x>=0.0)?(x):(-(x)))
  27. #define    Fputs(stream, s)    (void) fputs(s, stream)
  28. #define rewrite(f,n)    f = openf(n+1, "w")
  29. #define    reset(f,n)    f = openf(n+1, "r")
  30. #define flush(f)    (void) fflush(f)
  31. #define    true        1
  32. #define    false        0
  33. #define    chr(x)        (x)
  34. #define    ord(x)        (x)
  35. #define    vgetc(f)    (void) getc(f)
  36. #define    uexit(x)    exit(x)
  37.  
  38. FILE *openf();
  39.  
  40. /*
  41.  * Global Types
  42.  */
  43. typedef FILE    *text, *file_ptr;
  44. typedef char    *ccharpointer;
  45.  
  46. /*
  47.  * Global Data and Datastructures
  48.  */
  49.  
  50. extern integer argc;
  51. extern integer zround();
  52. extern integer inputint();
  53.